<include file="Public/header" /></head>

<body>
<div class="page-group">
    <div class="page page-current">
        <header class="bar bar-nav search">
            <a class="button button-link button-nav pull-left back" href="javascript:window.history.go(-1)">
                <span class="icon icon-left"></span>
            </a>
            <h1 class="title">会员中心</h1>
        </header>
        <div class="content">
            <div class="ds-title new-title">
                <span class="sel" type="2" >科目三</span>
                <span class="b-gray sel" type="1" >科目二</span>
                预约记录
            </div>
            <div class="record-list">
                <table border="0" cellspacing="0" cellpadding="0">
                    <thead>
                    <tr>
                        <td>教练</td>
                        <td>时间</td>
                        <td>学时</td>
                        <td>类别</td>
                        <td>状态</td>
                    </tr>
                    </thead>

                    <tbody id="info">

                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    $(".sel").click(function(){
        $(".sel").removeClass('b-gray');
        $(this).addClass('b-gray');
        var type = $(this).attr('type');
        $("#info").find('tr').remove();
        ajax_index(type);
    });

    $(function(){
        ajax_index('all');
    });

    function ajax_index(type){
        $.ajax({
            url : "{:U('ajax_index')}",
            data:{type:type},
            type:'get',
            success:function(data){
                $("#info").append(data);
            }
        });
    }
</script>

<include file="Public/footer" />